<template>
  <div class="settings">
    <van-field input-align="right" v-model="setValue_parent" :label="label" readonly />
  </div>
</template>

<script>

export default {
  props:['setName','setUntil','setValue'],
  data(){
    return {
      label:this.setName,
      setValue_parent:this.setValue
    }
  },
  watch:{
    setValue(newVal){
      this.setValue_parent=newVal;
    }
  },
  methods: {
    getLabel(){
      if(this.setUntil==undefined){
        this.label=this.setName;
      }else{
        this.label=`${this.setName}(${this.setUntil})`;
      }
    }
  },
  mounted(){
    this.getLabel();
  }
}
</script>

<style scoped lang="less">

</style>